﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;
using UniversalShopAdmin.DataManager;
using UniversalShopAdmin.ViewModels.Admin;

namespace UniversalShopAdmin.Controllers
{
    public class AdminController : Controller
    {
        private UniversalShopDBEntities Db { get; set; }
        public AdminController()
        {
            this.Db = new UniversalShopDBEntities();
        }
        public ActionResult ListUsers()
        {
            var model = new ListUsersViewModel(Db.Users.ToList());
            
            return View("Users/List", model);
        }

        public ActionResult NewUser()
        {
            return View("Users/New");
        }
    }
}
